package com.songshuai.sales.tool.config;

import com.songshuai.webapi.baseapi.utils.QiNiuUploadUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * 七牛云配置
 * @Author: wbl
 * @Date: 2019/03/27 17:24
 * @Version 1.0
 */
@Configuration
public class QiNiuYunConfig {

    @Value("${qiniuyun.domain}")
    private String domain;

    @Value("${qiniuyun.ACCESS_KEY}")
    private String access_key;

    @Value("${qiniuyun.SECRET_KEY}")
    private String secret_key;

    @Value("${qiniuyun.bucketname}")
    private String bucketname;



    @Bean
    @Scope("prototype")
    public QiNiuUploadUtil QiNiuYunConfig(){
        return QiNiuUploadUtil.build(access_key,secret_key,bucketname);
    }



}
